﻿using App.CommonModel.Db;
using App.TestApi.Models;
using AutoMapper;
using AutoMapper.Configuration.Annotations;

namespace App.TestApi.Controllers.Todos.Dto
{

    [AutoMap(typeof(Todo))]
    public class TodoDto : IdEntity<long> {

        /// <summary>
        /// todo 标题
        /// </summary>
        [SourceMember(nameof(Todo.Title))]
        public string Name { get; set; } = string.Empty;

        /// <summary>
        /// todo 是否完成
        /// </summary>
        public bool IsComplete { get; set; } = false;

        /// <summary>
        /// 完成时间
        /// </summary>
        public DateTime? CmpleteDt { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateDt { get; set; } = DateTime.Now;
    }
}
